package com.chengqs.chapter03;

import android.graphics.Color;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;

public class TextColorActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_text_color);

        TextView tvCodeSystem = findViewById(R.id.tv_code_system);
        tvCodeSystem.setTextColor(Color.GREEN);

        TextView tvCodeEight = findViewById(R.id.tv_code_eight);
        tvCodeEight.setTextColor(0xFF00FF00);

        TextView tvCodeSix = findViewById(R.id.tv_code_six);
        tvCodeSix.setTextColor(0x00FF00);

        TextView tvCodeBackground = findViewById(R.id.tv_code_background);
        // tvCodeBackground.setBackgroundColor(Color.GREEN);
        tvCodeBackground.setBackgroundResource(R.color.green);

    }
}